#ifndef __NPEC_FIFO_H__
#define	__NPEC_FIFO_H__

#include "sys.h"

/********************************************************************/
//for FIFO
/********************************************************************/
typedef struct
{
	uint16_t 		  start_pos;
	uint16_t 		  end_pos;
	uint16_t		  buffer_size;
	unsigned char *buffer_ptr;
} fifo_tcb_t;

void  		fifo_buffer_init( fifo_tcb_t*self, uint16_t buffer_size, uint8_t *buf_ptr );

void		fifo_buffer_push( fifo_tcb_t * self, unsigned char*data, uint16_t size );

void  	 	fifo_buffer_pop( fifo_tcb_t * self, unsigned char*data, uint16_t size );

uint16_t 	fifo_buffer_get_size( fifo_tcb_t * self );

void 		fifo_buffer_empty( fifo_tcb_t * self );


#endif
